<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Define common Csla Factory Methods</Title>
      <Author>Rockford Lhotka</Author>
      <Description>Defines common Csla-style factory methods.</Description>
      <HelpUrl />
      <SnippetTypes />
      <Keywords />
      <Shortcut>cslafact</Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports />
      <Declarations>
        <Literal Editable="true" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
          <ID>ClassName</ID>
          <Type>String</Type>
          <ToolTip>Replace with class name.</ToolTip>
          <Default>BusinessClass</Default>
          <Function />
        </Literal>
        <Literal Editable="true" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
          <ID>IdName</ID>
          <Type>String</Type>
          <ToolTip>Replace with Id (primary key) variable name.</ToolTip>
          <Default>id</Default>
          <Function />
        </Literal>
        <Literal Editable="true" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
          <ID>IdType</ID>
          <Type />
          <ToolTip>Replace with the Id (primary key) variable type.</ToolTip>
          <Default>Integer</Default>
          <Function />
        </Literal>
      </Declarations>
      <Code Language="VB" Delimiter="$">
  <![CDATA[Public Shared Async Function New$ClassName$() As Task(Of $ClassName$)
  Return Await DataPortal.CreateAsync(Of $ClassName$)()
End Function

Public Shared Async Function Get$ClassName$(ByVal $IdName$ As $IdType$) As Task(Of $ClassName$)
  Return Await DataPortal.FetchAsync(Of $ClassName$)($IdName$)
End Function]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>